package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import com.itheima.pojo.User;

import java.util.List;
import java.util.Map;

public interface UserDao {

    User findByUsername(String username);

    void add(User user);

    Page<Member> selectByCondition(String queryString);

    void setUserAndRole(Map<String, Integer> map);

    User findById(int id);

    List<Integer> findRoleByUserId(Integer id);

    void deleteAssociation(Integer id);

    void edit(User user);

    void deleteById(Integer id);

    List<User> findAll();

    List<Map<String, Object>> findUserCount();

    long findCountByUserId(Integer id);
}
